<?php
/**
 * 关于数字的一些类库
 * 2020/10/10
 * Created by breeze
 * User: breeze
 */
declare(strict_types=1);
namespace app\common\lib;


class Num
{
    public static function getCode(int $len = 4) :int {
        $code = rand(1000,9999);
        if($len == 6 ){
            $code = rand(100000,999999);
        }
        return $code;
    }
}